package leetcode.code0802;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution802 implements IDebug {

	public abstract List<Integer> eventualSafeNodes(int[][] graph);

	@Override
	public void debug1() {
		List<Integer> e = HelpDebug.str2intlist("[2,4,5,6]");
		// H.str2array1("[[1,2],[2,3],[5],[0],[5],[],[]]")
		int[][] graph = new int[7][];
		graph[0] = new int[] { 1, 2 };
		graph[1] = new int[] { 2, 3 };
		graph[2] = new int[] { 5 };
		graph[3] = new int[] { 0 };
		graph[4] = new int[] { 5 };
		graph[5] = new int[] {};
		graph[6] = new int[] {};
		HelpDebug.compare(e, this.eventualSafeNodes(graph));
	}

	@Override
	public void debug2() {
		List<Integer> e = HelpDebug.str2intlist("[4]");
		int[][] graph = new int[5][];
		graph[0] = new int[] { 1, 2, 3, 4 };
		graph[1] = new int[] { 1, 2 };
		graph[2] = new int[] { 3, 4 };
		graph[3] = new int[] { 0, 4 };
		graph[4] = new int[] {};
//		graph[5] = new int[] {};
//		graph[6] = new int[] {};
		HelpDebug.compare(e, this.eventualSafeNodes(graph));
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
